#include<bits/stdc++.h>
using namespace std;
// 基本二分查找

int binarySearch(vector<int> nums, int target){
    int l = 0;
    int r = nums.size();

    while(l < r){
        int mid = (l+r)>>1;
        if(nums[mid] == target){
            return mid;
        }
        else if(nums[mid] < target){
            l = mid+1;
        }
        else{
            r = mid;
        }
    }

    return l;
}

int main(){
    vector<int> nums = {1,3,4,5,6,7,14,88,133,223,343,999};
    cout<<nums[binarySearch(nums,88)]<<endl;
    return 0;
}